import request from '@/config/axios'

//设备分页
export const devicePage = async (params) => {
  return await request.getOriginal({
    url: '/amp/device/page',
    params
  })
}
//设备删除
export const deviceDelete = async (data) => {
  return await request.postOriginal({
    url: '/amp/device/delete',
    data
  })
}
//设备重启
export const deviceRestart = async (id) => {
  return await request.get({
    url: '/amp/device/restart?id=' + id
  })
}
//设备重启
export const deviceStop = async (id) => {
  return await request.get({
    url: '/amp/device/stop?id=' + id
  })
}
//设备详情
export const deviceGet = async (id) => {
  return await request.get({
    url: '/amp/device/get?id=' + id
  })
}
//设备创建
export const deviceCreate = async (data) => {
  return await request.post({
    url: '/amp/device/create',
    data
  })
}
//设备更新
export const deviceUpdate = async (data) => {
  return await request.put({
    url: '/amp/device/update',
    data
  })
}
//趋势统计
export const deviceTrendStatistics = async (id) => {
  return await request.get({
    url: '/amp/device/trendStatistics?deviceId=' + id
  })
}
